package cn.gf.dimanagementchartdatatransfor.controller;


import cn.gf.dimanagementchartdatatransfor.task.AsyncTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@Slf4j
public class manualController {
	private AsyncTask asyncTask;
	@Autowired
	public void setAsyncTask(AsyncTask asyncTask) {
		this.asyncTask = asyncTask;
	}

	@GetMapping("/manualTrans")
	public void manualTrans(@RequestParam("offsetDatetime")String offsetDatetime){
		asyncTask.task01(offsetDatetime);
		asyncTask.task02(offsetDatetime);
	}
}
